package com.cloudkinto.vo.order.outbound;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 20427
 */
@Data
public class WavePickingDetail {

    @ApiModelProperty("波次id")
    private Long id;

    @ApiModelProperty("波次号")
    private String waveNo;

    @ApiModelProperty("状态")
    private String status;

    @ApiModelProperty("波次品种类型")
    private Integer waveVarietyType;

    @ApiModelProperty("订单数量")
    private Integer orderNum;

    @ApiModelProperty("产品数")
    private Integer shouldPickingQty;

    @ApiModelProperty("待拣货数据")
    private List<WavePickingDetail.PackingDetailBySku> packingList = new ArrayList<>();

    @Data
    public static class PackingDetailBySku {
        private Long productId;
        private String sku;
        @ApiModelProperty("产品条码")
        private String mainBarcode;
        @ApiModelProperty("产品名称")
        private String productName;
        @ApiModelProperty("应拣")
        private Integer forecastQty;
        @ApiModelProperty("已拣")
        private Integer outboundQty;
        private List<WavePickingDetail.CellInfo> cellInfoList = new ArrayList<>();
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class CellInfo {
        @ApiModelProperty("推荐库位id")
        private Long cellId;
        @ApiModelProperty("推荐库位编码")
        private String cellCode;
        @ApiModelProperty("库位可用数量")
        private Integer availableQty;
        @ApiModelProperty("推荐拣货数量")
        private Integer qty;
    }
}
